package com.uottawa.busstopreminder;
 
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
 
public class AndroidTabLayoutActivity extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
 
        TabHost tabHost = getTabHost();
 
        // Tab for Photos
        TabSpec maps = tabHost.newTabSpec("Maps");
        maps.setIndicator("Maps");
        // setting Title and Icon for the Tab
//        maps.setIndicator("Photos", getResources().getDrawable(R.drawable.icon_photos_tab));
        Intent mapsIntent = new Intent(this, MainActivity.class);
        maps.setContent(mapsIntent);
 
        // Tab for Songs
        TabSpec speed = tabHost.newTabSpec("Speed");
        speed.setIndicator("Speed");
       // speed.setIndicator("Songs", getResources().getDrawable(R.drawable.icon_songs_tab));
        Intent speedIntent = new Intent(this, SpeedActivity.class);
        speed.setContent(speedIntent);
 
        // Adding all TabSpec to TabHost
        tabHost.addTab(maps); // Adding photos tab
        tabHost.addTab(speed); // Adding songs tab
    }
}